package autowired;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
/**
 * @Author quan
 * @Description TODO
 * @Date 2023/7/14 15:24
 */

//@Service
//public class UserService {
//    public void doService(){
//        System.out.println("do service");
//    }
//}

@Service
public class UserService {
    @Bean
    public User user1(){
        User user = new User();
        user.setName("小花花");
        user.setAge(1);
        return user;
    }
    @Bean
    public User user2(){
        User user = new User();
        user.setName("小叶子");
        user.setAge(2);
        return user;
    }
}


